home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 147
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan).7z
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan) (Track 1).bin
/
games
/
ippon
/
source.lzh
/
FuncEnemy
/
lboss01c.c
< prev
next >
Wrap
C/C++ Source or Header
|
2000-07-07
|
1KB
|
78 lines
/* lboss01c.c ボスのカバー */
#include <xsp2lib.h>
#include "../main.h"
#include "../player.h"
#include "../shot.h"
#include "../enemy.h"
#include "../eshot.h"
#include "../effect.h"
#include "../psearch.h"
#include "../sound.h"
#define PALET_MAIN 0x0700
/* 関数プロトタイプ宣言 */
static short EnemyMoveLBoss01C (ENEMY *);
static void EnemyFreeLBoss01C (ENEMY *);
/* 初期化ルーチン */
void EnemyAllocLBoss01C (ENEMY * p)
{
p->vx = 0;
p->vy = 0;
p->pt = obj_lboss01;
p->info = PALET_MAIN | PRIORITY_BOSS_PARTS;
p->hit_sx = 0;
p->hit_sy = 0;
p->damage = 0;
p->flash = 0;
p->hp = 10000; /* 破壊不能 */
p->damage_mode = DAMAGE_THROUGH;
p->func_enemy_move = EnemyMoveLBoss01C;
p->func_enemy_free = EnemyFreeLBoss01C;
p->m_work = 0;
}
/* 移動ルーチン */
/* 返り値:非0なら消去 */
static short EnemyMoveLBoss01C (ENEMY * p)
{
/* 速度を足して上位ワード(固定整数部)だけ取り出す */
p->x = (p->lx += p->vx) >> 16;
p->y = (p->ly += p->vy) >> 16;
if (SHORT_VY < 2)
p->vy += 4096;
switch (p->m_work++) {
case 0:
case 8 + 15 * 1:
case 8 + 15 * 2:
EffectAlloc (EFFECT_EXPL, 0, p->x, p->y);
SoundSetSE (SE_EXPL); /* 爆発音を鳴らす */
break;
case 8 + 15 * 4:
EffectAlloc (EFFECT_EXPL, 0, p->x, p->y);
SoundSetSE (SE_EXPL_M); /* 爆発音を鳴らす */
// EffectAlloc (EFFECT_HAHENMINI, 0, p->x, p->y);
return (-1); /* 消去 */
break;
}
xobj_set_st (p);
return (0);
}
/* 消去ルーチン */
static void EnemyFreeLBoss01C (ENEMY * p)
{
}